import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import axios from 'axios' //安装axios:npm install axios
import Moment from 'moment'

import './plugins/element.js'
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/css/global.css'

Vue.config.productionTip = false

Vue.filter('datefmt',function (data,formatStr) {
    return Moment(data).format(formatStr);
})
Vue.use(ElementUI);

//路径前缀
// axios.defaults.baseURL="http://123.56.73.143:8001";
axios.defaults.baseURL="http://localhost:8001";

//挂载axios(相当于声明了一个vue的全局变量,命名是this,$http就可以使用了)
Vue.prototype.$http = axios

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
